/** 
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
* 
* SdIndexTabPermissionServiceAuto
* SD项目首页Tab权限表
* 
* 修改纪录
* 2021-11-19 版本：1.0 jiangtao 创建。
* @version 版本：1.0
* @author 作者：jiangtao
* 创建日期：2021-11-19
*/

package com.topscomm.gpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.gpm.*;
import com.topscomm.gpm.pojo.GpmIndexTabPermissionEntity;
import com.topscomm.gpm.dao.IGpmIndexTabPermissionDao;


public class GpmIndexTabPermissionServiceAuto extends GpmService<GpmIndexTabPermissionEntity, IGpmIndexTabPermissionDao> {
	
	/**
	 * @author: jiangtao
	 * @date: 2021-11-19
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("type") != null) {
			temp = mapRow.get("type").toString();
			mapRow.put("disptype", datacodeCache.getValueDynamic("PmTabIsPermissionType", temp, "code", "name"));
		}
		if (mapRow.get("isprohibit") != null) {
			temp = mapRow.get("isprohibit").toString();
			mapRow.put("dispisprohibit", datacodeCache.getValueDynamic("PmTabIsProhibit", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "sdIndexTabPermissionDao")
	public void setDao(IBasicDao<GpmIndexTabPermissionEntity> dao) {
		super.setDao(dao);
	}
}
